import {get, post} from "@/server/request";

export function finishPrint(data) {
    return post({
        url: 'budget/export/transItem',
        data
    });
}

export function commonSysAdd(data) {
    return post({
        url: 'singlePoint/commonSysAdd',
        data
    })
}

export function runTheHallOnceGuide(data) {
    return post({
        url: 'matterCase/guide',
        data
    })
}


export const asyncFocusService = (url, data) => {
    return post({
        url: url,
        data
    })
}

export const getEnterprise = (data) => {
    return post({
        url: 'jc/getEnterprise',
        // url: 'items/getEnterprise',
        data
    })
}

export const getItemByEnterpriseGuid = (data) => {
    return post({
        url: 'jc/getItemByEnterpriseGuid',
        // url: 'items/getItemByEnterpriseGuid',
        data
    })
}

export const getPageOriginBudget = (data) => {
    return post({
        url: 'budget/pageOriginBudget',
        data
    })
}

export const getPageOriginBudgetDetail = (data) => {
    return post({
        url: 'budget/pageOriginBudgetDetail',
        data
    })
}

export const getDynamicHeader = (data) => {
    return post({
        url: "dynamic/query/header",
        data
    })
}

export const getDynamicSearchCondition = (data) => {
    return post({
        url: 'dynamic/query/condition',
        data
    })
}

export const getKeyByMenuId = (data) => {
    return post({
        url: 'bpmMenu/getKeyByMenuId',
        data
    })
}

export const getTaskHandleNodeFreeSelectUser = (data) => {
    return post({
        url: 'formTask/task/handleNodeFreeSelectUser',
        data
    })
}

export const addBudget = (data, url) => {
    return post({
        url: `budget/${url}`,
        data
    })
}

export const fileUpload = (data) => {
    return post({
        url: 'file/upload',
        data,
        headers: {
            'Content-Type': 'multipart/form-data'
        },
    })
}

export const fileUploadMulti = (data) => {
    return post({
        url: 'file/uploadMulti',
        data,
        headers: {
            'Content-Type': 'multipart/form-data'
        },
    })
}

export const getFormTaskList = (url, data) => {
    return post({
        url: url,
        data
    })
}

export const getFormTaskInstance = (params) => {
    return get({
        url: 'formTask/instance/flowImage',
        params: params,
        responseType: 'blob'
    })
}

export const getSidByDefKey = (data) => {
    return post({
        url: 'bpmMenu/getSidByDefKey',
        data
    })
}

export const getAdjustBudgetFormGuid = (data) => {
    return post({
        url: 'budget/findByFormGuid',
        data
    })
}

export const getInstanceOpinion = (data) => {
    return get({
        url: 'formTask/instance/getInstanceOpinion',
        params: data
    })
}

export const getCanBackHistoryNodes = (data) => {
    return post({
        url: 'formTask/task/getCurrentTaskPreNode',
        data
    })
}

export const getProToType = (data) => {
    return post({
        url: '/budget/getProToType',
        data
    })
}

export const userJcGetList = (data) => {
    return post({
        url: '/jcUser/jc/getList',
        data
    })
}

export const userJcAdd = (data) => {
    return post({
        url: '/jcUser/jc/add',
        data
    })
}

export const userJcDelete = (data) => {
    return post({
        url: '/jcUser/jc/delete',
        data
    })
}

export const budgetPageFormBudget = (data) => {
    return post({
        url: '/budget/pageFormBudget',
        data
    })
}

export const budgetPageFormBudgetDetail = (data) => {
    return post({
        url: '/budget/pageFormBudgetDetail',
        data
    })
}

export const budgetTransItem = (data) => {
    return post({
        url: '/budget/transItem',
        data
    })
}

export const filePage = (data) => {
    return post({
        url: '/file/page',
        data
    })
}

export const downFile = (data) => {
    return get({
        url: '/project/downLoad',
        params: data,
        responseType: 'blob',
    })
}
export const downFileNew = (data) => {
    return get({
        url: '/file/downloadById',
        // url: '/file/getfile',
        params: data,
        responseType: 'blob',
    })
}
export const previewOnline = (data) => {
    return get({
        url: '/onlinePreview',
        params: data,
        // responseType: 'blob',
    })
}

export const getPersonConfig = (data) => {
    return post({
        url: 'jc/getPersonConfig',
        // url: 'items/getPersonConfig',
        data
    })
};

export const getInformation = (data) => {
    return post({
        url: '/msg/linker/list',
        data
    })
}

export const getBPMId = (data) => {
    return post({
        url: '/formTask/getBpmId',
        data
    })
}

export const getCanNotReCall = (data) => {
    return post({
        url: '/formTask/instance/canNotReCall',
        data
    })
}

export const getDoAction = (data) => {
    return post({
        url: '/formTask/instance/doAction',
        data
    })
}
